drop onsetofriskCRL
gen onsetofriskCRL=.
replace onsetofriskCRL=1974 if independence<=1974
replace onsetofriskCRL=independence if independence>1974
tab onsetofriskCRL, m
set memory 2m 




snapspan cowcode year1 CRL, gen(exposuretoCRL)
sort cowcode year1

stset year1, id(cowcode) time0(exposuretoCRL) origin(time onsetofriskCRL) failure(CRL==1)


*Model 3*
foreach model in exponential weibull gompertz   {
	streg  i.roadconvention i.agreementwhelveh  i.commonwealth poplog  i.Worldreport i.NGO  gdplog urbanization if year1<2017, dist (`model')  vce (cluster NetworkUNregion) 
	estimates store `model' 
}
estimates stats _all


*Model 4*

foreach model in exponential weibull gompertz   {
	streg  i.roadconvention i.agreementwhelveh  i.commonwealth poplog civtot RSA  i.Worldreport i.NGO gdplog urbanization if year1<2017, dist (`model')  vce (cluster NetworkUNregion)
	estimates store `model' 
}
estimates stats _all

*Model 7b Africa*
foreach model in exponential weibull gompertz   {
	streg i.roadconvention  i.agreementwhelveh i.commonwealth poplog  civtot RSA i.Worldreport i.NGO  gdplog urbanization if NetworkUNregion<6 , dist (`model')  vce (cluster NetworkUNregion)
	estimates store `model' 
}
estimates stats _all

*Model 8b ASIA and the PACIFIC*
foreach model in exponential weibull gompertz   {
	streg i.roadconvention i.agreementwhelveh i.Eurocouncil i.commonwealth poplog civtot RSA i.Worldreport i.NGO  gdplog urbanization if asiapacific==1, dist (`model')  vce (cluster NetworkUNregion)
	estimates store `model' 
}
estimates stats _all

*Model 9b Western ASIA *
foreach model in exponential weibull gompertz   {
	streg i.roadconvention i.agreementwhelveh i.commonwealth poplog  civtot RSA i.Worldreport i.NGO gdplog urbanization if westasia==1, dist (`model')  vce (cluster NetworkUNregion)
	estimates store `model' 
}
estimates stats _all



*Model 10b Europe and NA*
foreach model in exponential weibull gompertz   {
	streg i.roadconvention i.agreementwhelveh i.commonwealth Eurocouncil poplog  civtot RSA i.Worldreport i.NGO  gdplog urbanization if   NetworkUNregion==11 | NetworkUNregion==12 | NetworkUNregion==13  | NetworkUNregion==14 | NetworkUNregion==18, dist (`model')  vce (cluster NetworkUNregion)
	estimates store `model' 
}
estimates stats _all

*Model 11b LAC*
foreach model in exponential weibull gompertz   {
	streg i.roadconvention i.agreementwhelveh i.commonwealth poplog  civtot RSA i.Worldreport i.NGO  gdplog urbanization if   NetworkUNregion==15 | NetworkUNregion==16| NetworkUNregion==17, dist (`model')  vce (cluster NetworkUNregion)
	estimates store `model' 
}
estimates stats _all


*Model 12b Commonwealth*
foreach model in exponential weibull gompertz   {
	streg i.roadconvention i.agreementwhelveh poplog  civtot RSA i.Worldreport i.NGO gdplog urbanization if  commonwealth==1, dist (`model')  vce (cluster NetworkUNregion)
	estimates store `model' 
}
estimates stats _all
